Remade the whole application. Made separate file for main function Counter. Made header file. Minor bug fix and optimization