General cleanup & Error checking.
Added .gitignore