Fixing sytax errors from encapsulation