Updating to use foundation classes