Added basic support for button enable/disable (and several related TODOs)