added LOTS of comments, finished refactoring code to use bytearrays in place of strings