changed to use json on some config files, user middleware and other stuff