WIP: Extract JS object construction into individual files