Segragate loader into a separate module