Modified javascript to follow a less efficient, but far more readable 'function' form. Added SQL model connections to update tables. Added AJAX to call model upon updates. NOTE: This entire implementation does not follow MVC properly - this is intentional as a full MVC implementation would be much less accessible to all levels of javascript programmers.