Moved attach into enableEditing
Updated documentation, named anonymous functions
Added detach function that reverses bindings performed in attach
Tidy up