Updated database structure, added a new stored methods.