Updated some encryption-checking and cleaned up the overall design a bit.