Implemented queue state.
Started checkQueue logic