 import QuartzCore
 
 class PlaceCarouselViewController: UIViewController {
-
-    // All views in the background are going to be displayed using a stack view
-    lazy var baseView: UIStackView = {
-        let view = UIStackView()
-        view.axis = .vertical
-        view.distribution = UIStackViewDistribution.fillProportionally
-        view.translatesAutoresizingMaskIntoConstraints = false
-        return view
-    }()
 
     // the top part of the background. Contains Number of Places, horizontal line & (soon to be) Current Location button
     lazy var headerView: PlaceCarouselHeaderView = {

        super.viewDidLoad()

        // add the views to the stack view
        view.addSubview(baseView)
        baseView.addArrangedSubview(headerView)
        baseView.addArrangedSubview(sunView)
        baseView.addArrangedSubview(mapView)

        // setting up the layout constraints
        var constraints = [baseView.topAnchor.constraint(equalTo: view.topAnchor),
                           baseView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
                           baseView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
                           baseView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
                           headerView.heightAnchor.constraint(equalToConstant: 150),
                           sunView.heightAnchor.constraint(equalToConstant: 90),
                           mapView.heightAnchor.constraint(equalToConstant: 400)]


        // set up the subviews for the sunrise/set view

        view.translatesAutoresizingMaskIntoConstraints = false
        view.backgroundColor = .white

        view.layer.shadowColor = UIColor.darkGray.cgColor
        view.layer.shadowOpacity = 0.25
        view.layer.shadowOffset = CGSize(width: 0, height: 2)
        view.layer.shadowRadius = 2
        view.layer.shouldRasterize = true

        return view
    }()
