Major efficiency fixes, "BGLibConfig.h" header for selective functionality, new slave stub example