fixed some encryption errors and documented my stuff