Add more comments and debug option
Refactoring
Support Github Enterprise