Added a few minor formatting changes
Move some sections around so important checks happen earlier