Refactoring: issues #212 and #215. 24-08-14