Working correction on previous errors.

Working demonstration but still needs some polishing on functions and
logic.