moved classes to lib