Refactor to leverage rave internals as much as possible and allow configuration of file extensions.