Git integration

Replaces #48 (same PR from my repo) so that everyone can edit this code. Sorry for the confusion.