Added bindings for click handlers; also modified the generated markup to add in some needed data.