Rearranged some things, updated formatting