some doc and cleanup