Added View controls
Simplified code