Added a proper readme and some more documentation and made some very small optimizations.