Cleanup hardware queue

Some code cleanup. 
Use `make check` in repository root. I will add info in README about it.