Move scalar initializations on top if possible