Dev

Various corrections and improvements