close buttons, api

added close buttons and fixed api call