Reorganized some things to make them clearer