Work on inference and tests