Started implementing some common functions