Fixing bugs introduced while porting.

ArrayClass is magical. Several methods had recursive implementation. PatternMatching was shadowing parameter.
Adapt unit tests to use ScalacBackendInterface