Refactoring BUGS.h