Fixing getType() and adding toString().