added comments, cleaned up code
updated readme