Remove global $ag refs from twelvesands object, use $this->ag