Add the ability to sort callbacks

thanks to a "priority" index in the config
Fix disabling state feature
Add specs for extension config parsing