Track the Function runtime class

Also did some cleanup