Very close to writing to database

Currently unable to pass in objects