Implement basic functionality for operation at e18.

Add basic funtionality for operation at e18, mainly a copy form the
gridka iimplemetation.