cleanup and some better output