Receiver code cleanup