Start Refactor to Database