Cleanups and markup optimizations