v0.6 development merge of refactor branch