reorganized db and template directories and gitignore