merged with leapjs master