Moved several files to lib directory