Refactoring/style changes according to HLint.

Also adding .gitignore file so /dist is not committed to version control.