Pass app instance when loading lib
New Config class, fixed some regexes
- Added 'dotty' dependency
- requireable regex wasn't replacing correctly .json extensions
- Removed filename part from the js regex