Fixed a code misalignment and reordered the declarations