Added new signatures, added checks for existing signatures, and cleaned up some of the code