forward port from 0.4.18. removed local mode in installer
tidy ups