refactor(loader): abstract out base element