Merge of refactoring in #215, #271 and #272