Changed to be more user extendable.