Trying to cut these monster files to manageable size... moving math support functions...