end of day cleanup and testing