Adding global wrapper and corrected attach functions