Adds in missing math header. Remove debug printf that causes infinite loop.