More and more fixes and improvements