Implementation of main interface methods.