Added rotateTowrds and fixed line endings