Architecture changes and improvements

 * Cleanup
 * Main data source for app moved to database