Initial implementation of common.lua