WIP Cartridge Refactor - Finish context checking

* Port of oo-trap-user to ruby
* Fixes to Node code to enhance oo-trap-user.rb performance