small changes
fixed very strange bug that broke numpy slicing
using cython memoryviews for data management