Added a logical structure to the lib
It was starting to become too big for one file