Magnetic field computation added along with initial tests. Pair class refactored to be immutable