Moved building of actual html to knpmenu's mechanism, refactored appropriately