add helper methods to json response.
fix conflicts.
update doc block.
fix conflicts.
use array_get on files.
use array_get on files.
work on hasFile and file.
fix conflicts.