Basic REPL working
Cleaning up code and adding lots of comments