You could use the algorithms, just not their implementation of the algorithms. If you rewrote it from scratch, following their text (not their source code), you were fully allowed to use it.
IF cost_of_settlement < cost_of_court_action THEN pay_up(); /* ? */
Copyright protects the What (tangible creative works, such as, printed publications, movies, sound recordings, source code, and so on)
Trademark protects the Who (who made this service or product)
Patent protects the How (how does this widget do what is does)
Patents on software are not that simple - it needs to describe an entire physical system that gives value to a user, not just an abstract function that does computation.