Fixed rotation and autogens dims.h
cleaned some stuff up