Fix the database code
Stop using Controller for this small project