Fixes all the rest of the things. Should be ready to merge now.