Refactoring and some button changes