Deplaced not common functions from common to the corresponding file