Code Refactoring

Separated rubyAltarTrap code into separate class, refactored to use
class and global variables.