Code cleanup

Also, fix board checking query part stuff

Signed-off-by: Shitiz Garg <mail@dragooon.net>