Finished code
Added closebutton