Neatened up the code, added an alternative way to connect the HATs