Re-structured 3D refinement code.
Fixed bugs in 3D refinement.
Bug fixing in 1:8 wedge refinement - more to come.