Code re-structure and clean up
DB update