Move math stuff into moebius.js.