Seperated the js from the template and removed a dummy button and div element