Moved the toggling code to the TileEntity instead of inside the gui to prepare for upcoming functions delay and pulse