render new structure to HTML + cleanups