Need to test and tweak signals. Need to write exit function