Remove references to Rails class while loading engine to avoid 'Circular dependency' errors