Fixes issue #2

Visual C++ needs to have declarations in the beginning of a subroutine before any other statement is carried out.