Implement "Sell" state

Add implementation of sell and refactoring runtime