fixed indentation and some more cleanup