Added outline and partial implementation for new algorithm. Includes database classes and repository