First complete draft of DatabaseManager