src formatting and bug fixes