Semi Functional Program. Needs refactoring. Updated README.