Fixed Dimension projection bug. Other numerous small fixes