Small code changes

Replace deprecated function calls and consistently use :require