Added algorithms class, and updated some interfaces and exceptions