cleaned up the hub code
cleaned up the hub code