Added a debug rule to the Makefile, added more details to the README file, fixed a few issues in the code