Added encryption and flags