Move code to library; add new properties to Product