Added support for 2 spatial dimensions.
Better 2d support.
Added the finite harmonic oscillator potential + some refactoring.