genericised the library

changed some of the sections that were specific to WPM to be more
generic