Split out more classes into general library