creating main.js cleaning html and struct