Revert "Updated code from fork."

This reverts commit a0adb84c8da6260a25d8e13fa406a5e84df67b24.