Reorganized to be more sane