Simplifying some code. Fixing test which was commented out.