Remove some unused variables, add a missing declaration, etc
Replace numpy with typed memoryviews
More changes to memoryview