fixed many bugs, added several important validations
added statistics in dashboard, and improved several minor cases.