Partial rewrite of Buttons to make it cleaner