Added grant support

Closes #3