Refactored. Lib dir created