Fixed add_extension() and add_to_class() usage