Cleaned up rek().