Add variable names to header file
Move variable declarations to the start of blocks
Fix imports