Code tidy up and ocp-indenting