Added encryption and some other stuff