added button type parsing
updated code to return button
added javascript callback for header buttons
updates based on review
Merge pull request #47 from dottertrotter/add_options_handling

Add options handling