Moved files in the api package to the lib package