Moved code into composer libraries