Move classes to lib directory