Moved pibot class to lib