Added disable and enable buttons functions.

Important for large input to not mess up the data structure.
Adjusting constants.