Make file added. Code refactored. Gitignore added.