Source updated with math fixes