Update .gitignore and match function names to style guide
Add basic error checking