polymorphic loading improvements, code cleanup