Refactored some more and added README file