fixed app interface
refactored database classes
refactored package structure