Cython support

This isn't ready to merge yet, but since it's getting there I thought it would be useful to change to a pull request. Fixes #27.

Things to do:
- [x] Create all templates
- [x] Make all templates efficient
- [x] In depth testing
- [x] Fix crashing on quit.