Update graphene.py

Code fixes + cleanup
Uses sparse matrices
Vector-based coordinate system