rel. 0.6: code refactored

code simplifaction, more comments