Enforce interfaces in Algorithms singleton.
Get rid of class constants where necessary.

Too bad since they provide a performance boost compared to method calls
but this was required as their presence can't be enforced with interfaces.