The Big Refactor

Don't merge. At this point I just want Travis builds to work again.