General code clean up an freezing of version to 2.4.0.1.
TODO: get rid of warnings, write more documentation