Add rudimentary code to align multiple cubes
Document and clean alignment code