Updated code to newest framework.