little fixes for edit page: mapping model to array in javascript object