added possibility to "define" a class within ON_BEFORE_REQUIRE event. checked classExists before include it.