Few functions moved to common.go