Implemented policy selection.
Add: bug.h bug.cpp for debugging functions.