Clean up and static types.
More efficient indexing.
Merge pull request #9 from AlexanderFabisch/cleanup-python

Cleanup python