update .gitignore
add some helper functions, clean up