Refactor to support latest composer packages