Code cleaned again, some headers moved to the top of the file.