contract Sale is CappedCrowdsale, Ownable {
    using SafeMath for uint256;

    bool public isFinalized = false;
    event Finalized();

    // Constructor
    function Sale(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap, address _wallet, address _tokenAddress)
    Crowdsale(_startTime, _endTime, _rate, _wallet)
    CappedCrowdsale(_cap)
    {
        token = LamdenTau(_tokenAddress);
    }
    // * * *
    
    // Crowdsale overrides
    function createTokenContract() internal returns (MintableToken) {
        return LamdenTau(0x0);
    }
    
    function validPurchase() internal constant returns (bool) {
        super.validPurchase();
    }

    function buyTokens(address beneficiary) public payable {
        super.buyTokens(beneficiary);
    }
    // * * *

    // Finalizer functions
    function finalize() onlyOwner public {
      require(!isFinalized);
      require(hasEnded());

      finalization();
      Finalized();

      isFinalized = true;
    }
    
    function finalization() internal {
        token.finishMinting();
    }
    
    function claimToken(address _m) public onlyOwner returns(bool) {
        Mediator m = Mediator(_m);
        m.passOff();
        token.acceptOwnership();
        return true;
    }

    function changeEndTime(uint256 _e) public onlyOwner returns(uint256) {
        require(_e > startTime);
        endTime = _e;
        return endTime;
    }

    function mintTokens(uint256 tokenAmount) public onlyOwner {
       require(!isFinalized);
       token.mint(wallet, tokenAmount);
    }
    // * * *
}
function Sale(uint256 _startTime, uint256 _endTime, uint256 _rate, uint256 _cap, address _wallet, address _tokenAddress)
Crowdsale(_startTime, _endTime, _rate, _wallet)
CappedCrowdsale(_cap)
{
    token = LamdenTau(_tokenAddress);
}

// Constructor