Bug fixing & formatting changes