Minor refactoring
Handle mouse input correctly
Update Gate root markers