minor improvements, both logic and layout