cleanup & improved indentation