Updated the readme and cleaned up some code a little