refactoring html (canvas width, merge spans)