Cleanup some code + minor ui tweaks