Converted to scala. Clean code ftw!
Fix some stupidness
Update .gitignore
Merge branch 'rewrite'