Aggregate db models, validations and associations

Please merge my work to master branch