Move to lib and added configure