Get procedures outside; various fixes and improvements