Refactored and included html beautifier