Changes for http://dev.sourcefabric.org/browse/CST-67 and others

fixes