Made changes to switch between the different layers