Reorganized the work a little