Move all code to lib folder.