Change function and status system to directly load functions by xml