Add warning when prev solution is still in queue

Add language constants.
Bug fix

Some verisons of PHP do not allow accessing an array element when
returning from a function. Add language constants
Switch some variables for constants

Add comments. Add method for gettin user last attempt