Move var declaration from the top