Fixed db schema and added context