Refactor library folder