refactored counter and bar GUI elements.