Move the push/peek handling of complex types into a separate file.