Updated API. Replaced ugly diagram.