Improvements

small fixes and improvements.