Move math to separate repo