I am currently adding some more comments in the code, which will hopefully make it easier to modify things later