Clean up button code and add doc blocks
Refactor methods to be cleaner, add docblocks
Fix for active links, fixes #221