initialize civi and formatting fixes