Attach and detatch events. Better handling of data from the web interface.