Removed unused function and added active class to buttons