Added new system for registering external functions for mod developers.