added database management, improved check, fixed gitignore