Add schema for lock, remove lndynamic things from common.