Move classes to lib