Part of implementation moved to header file.