Added convinient way to register class (using only one macro REGISTER_DYNAMIC and inheriting object).