Replacing object-based asyncronous check with proceedural code.
Misc Coding style.