M7 - Refactoring in button's functionality of data base and category selection.