minor optimization and visual improvements