Rewritten markup assembly system
Added caching