Added a readme.md
Formatted the code
Made some parts more generic
Added .gitignore plus editing instructions in readme