Refactor dependency/component loading