Moved to postgres. Implemented more complex mappings