Implementations of some basic an algorithms.