cleanup the code, add possible array of open and array of close button, plus open and close event listeners, plus open and close callbacks