added activities, permissions and precompile rules
fixed json quoting