Added more subclasses of Function. Refactored FunctionalMessage.