some more refactoring; added macros.html