Theme page code cleanup