Moved variable initialisation