Updated db models and wrote some simple methods