Original functionality restored after dehacking.

Still quite hacky though. :)