Moves classes from original component-cache and refactors app to accept config and env