move model code to Model; complete logging activities for book catologing