Restructured, switch functionality complete