Refactor into library for use with ORM and AMS