Code cleanup and visual improvements