Fix inconsistence between kind_of and of_type.
Resources are kind_of.
Check that file is readable
Big refactoring.
Temporary removing agents (seems to be useless).
Make resources working.