added .gitignore and added the database functions (yes, I know they're broken...)