Removed a lot of deprecated code calls