Bug fixes and some minor code improvements

I fixed a few bugs, made the code a bit more consistent and cleaned up git.cfc by using some accessors. 

If you have some changes you don't want, I can clean up the PR.