Replace member variable with method calls