Completed design db model. Change some bugs