cleaned up logging
some fixes