Rewrote the if statement for coordinate system conversion funcs.