Updated select event

Element state will only be updated when something has changed
The OnSelect event is now correctly fired off
Updated the element message handling to check for changes