Concise DOM construction using javascript objects