Refactor button initialization