Cleanup hardware queue

Some code cleanup. 
I would prefer to have separate script to run this check, if you don't mind.