Added waitingForPCard view state handler. There is a lot of repeated code between all of these functions, it could be probably boiled into one function that would use a variable of the state +ajax to select and add classes and such. But then readability would be poor, so we'll keep it this way