fixed indentation
general tidy up