Refactoring interface

merging with master