changed template to collapsible and lots of changes to the api docs