 		]
 	}()
 	
-	private lazy var tableViewConstraints: [NSLayoutConstraint] = {
-		return [
-			self.tableview.topAnchor.constraint(equalTo: self.tableview.topAnchor),
-			self.tableview.leadingAnchor.constraint(equalTo: self.tableview.leadingAnchor),
-			self.tableview.trailingAnchor.constraint(equalTo: self.tableview.trailingAnchor),
-			self.tableview.bottomAnchor.constraint(equalTo: self.tableview.bottomAnchor)
-		]
-	}()
-	
 	private lazy var tableview: UITableView = {
 		let t = UITableView()
 		t.translatesAutoresizingMaskIntoConstraints = false
 		t.register(JobTableViewCell.self, forCellReuseIdentifier: JobTableViewCell.description())
+		t.delegate = self
+		t.dataSource = self
 		return t
 	}()
+	
+	init(jobs:[Job]) {
+		self.jobs = jobs
+		super.init(nibName: nil, bundle: nil)
+	}
+	
+	override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
+		self.jobs = []
+		super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
+	}
+	
+	required init?(coder aDecoder: NSCoder) {
+		fatalError("init(coder:) has not been implemented")
+	}
 	
     override func viewDidLoad() {
         super.viewDidLoad()
 		title = "Jobs"
 		view.addSubview(tableview)
 		view.sendSubview(toBack: tableview)
-		NSLayoutConstraint.activate(tableViewConstraints)
+		tableview.pinToSuperview()
 		view.addSubview(spinner)
 		NSLayoutConstraint.activate(spinnerConstraints)
     }

        // Dispose of any resources that can be recreated.
    }
}


class JobsViewController: UIViewController {

	private var jobs:[Job]
	
	private lazy var spinner: UIActivityIndicatorView = {
		let view = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.whiteLarge)
		view.translatesAutoresizingMaskIntoConstraints = false
