Finished refactoring code and created html file