Major bug were fixed, some minor bugs still need proper handling