Cleanups, refactor.