Functional

Fixed variable naming bugs