Moved adapter class to the file.