Clean-up and improvements