More intelligent startup handling and remove webapp dep