cleaning libraries and structure