Updated encryption stuff and replaced some methods with properties