contract BLStorage is BLAccess {

    DataStorageInterface internal s;
    address public storageAddress;

    event StorageUpdated(address _newStorageAddress);

    function BLStorage() public {
        s = DataStorageInterface(mainAddress);
    }

    // allows to setup a new Storage address. Should never be needed but you never know!
    function setDataStorage(address newAddress) public onlyPrimary {
        s = DataStorageInterface(newAddress);
        storageAddress = newAddress;
        StorageUpdated(newAddress);
    }

    function getKey(uint x, uint y) internal pure returns(bytes32 key) {
        key = keccak256(x, ":", y);
    }
}
/*
 Wrapper around Data Storage interface
 */
function setDataStorage(address newAddress) public onlyPrimary {
    s = DataStorageInterface(newAddress);
    storageAddress = newAddress;
    StorageUpdated(newAddress);
}

// allows to setup a new Storage address. Should never be needed but you never know!