More flexible baseDir handling
Load dependencies only when needed
Exports editing, fixes #15