Clean up. Part 1

Extended .gitignore and cleaned up the code. Less warnings. Still not
functional.