Refactoring Button Class and adding Page Functionality