Set active state on format buttons

Closes #46.