Take out setup logic from init.