mist code moved to utils
minor changes