refactored project structure
added database, more test