[IM] [OSX] Refactoring and OSX updates. More trigger, action, mapping implementation, pretty much complete.