Improved documentation, debugging, makefile