some more clean up; moved gob related functions to separate file.
added .gitignore
moved some code around to make it easier to compile wo/solution.