Better exception support for process function
Cleaned up circuits
Fixed EditSelection capturing key events
Improved SelectionChanged logic