Make the function pretty
Move libraries to lib directory
Refactor the code by spliting it into multiple files