correct filesKey and fieldsKey logic

there were several issues with the implementation:

1. the files would get lost when remapping the body object to the body.fields object
2. code setting fields or files when no fields or files would fail
3. the normalize function was being called regardless if there was any body or not.