Started with refactoring the counter with jquery