Rename lib to core and fix paths in files