Our convention elsewhere is to put the "then" on a new line (meaning the semi-colon becomes superfluous).  Also, the semi-colons are superfluous in the following lines.