Refactor code librarires