Refactoring to correct variable name (xBar was absolutely wrong). Added
accessors for variables.