Hint factory safe

The branch with hint factory stuff.