Updated to remove old functions.