Added buttons and fixed variables