Refactor Github into standalone class