Added functionality to add a button to the interface menu list. Also restructured some code.