Modified moved multiple connect and disconnect gui change blocks into procedures