Various additions and improvements