Collected all sorts of math routines into own subdirectory.