Removed shadowed variables and hid helper methods