Starting refactor

Something weird is going on.