Reorganized the code into two different files.

I don't know if this is a good idea.

Added support for direct access to the numpy array. Before the array
would be a ctype, then cast as a list, then as a numpy array. This was
slow. You can do the whole thing in numpy.

More consistent parameter return values as tuples and not lists (I think
it makes more sense).