improve javascript object literal syntax