cleanup and better formatting