Refactored library to use namespaces and composer