adding initial support for listFiles
moving all json handling to the models