github enterprise support v2

new pr with only the changes required for github enterprise support and no mucking with styling