Updated to work with newer versions of stuff

Updated a lot of files to get it to work with current versions.