Some small changes and improvements