Implemented outer class elimination.

Fixed some of the other implemented code.
Changed catches to print the stack trace.