huge commit, worked on kill switch, added unit tests, cleaned up code, added emma for code coverage.