This repository unfortunately lacks the much needed internal documentation. If anybody is interested, please help me explain the code I have written