clean up unused code
minor code cleanup
fix width overflow