moved isPowerOf2 and wrap functions to CinderMath
minor sample cleanup