code cleanup and better looks