Refactor: loading of components now done in a seperate module + better error reporting