Major code refactoring: DAOs added.