Fixed formatting and type errors