Added Gateway wrapper for Hub + moved some stuff around