Include redheadedrod's latest changes

Changes to assist in legacy to doctrine conversions