Added .gitignore

Removed files which should not have been in repository in the first
place
Manually merged changes done since tree corruption

Quite a few changes, originally separated into separate commits
but git tree was corrupted. Pulled from remote and manually merged
changes from backup.

All unit tests now pass