and another stupid indent...
minor code nicening and indentation fixes
made paint function nicer...