Cleaned up code, fixed view directions and added rotating square.