Added missed patches from update. Removed leftover debug. Fixes #31