fixed warnings, added comments, improved forward probe logic