Move arithmetic functions to their own file