Moved some definitions from header to impl.