Back-end code transformed into class.

+ small adjustments of the method names in the existing front-end class.