New Version: Robust, saves state and code refactored
The new V4: Robust (Saves work state) and code refactored