Major refactoring, no useless HTML macros