refactor code and add readme

refactored code and added a readme.  Please go ahead and edit/add more things on there