Hint factory safe

The branch with hint factory stuff.
This needs updated.