moving api files to lib subdir