Major refactoring of the markup and javascript rendering engine.