Cleanup layout formatting and fix RTL