The sbChildren local variable can go, along with the if (!isMaster) line below