Moved DOM structure from js to view