Rewrote the logic involving relationship mapping.

Two separate collections are now maintained in the view. One to display the collection, and another to manage the model state to be synced with the server-side. This improves the readability of the generated code, and more importantly separates the presentation logic from the model synchronization bits.

Added jQuery 1.9.1 as a result, to use $.map().