Cleanup and OpenSURF modifications