Refined the code and added the test .html files