Implemented new simulator using groovy.