Refactoring library files & delete foundation files