update indentation and clean up