Cleaned up markup generation