Reorganize the messy setup