Throw custom exceptions for Github errors
Split source into library and CLI frontend
Add docs