Remove lines which causes warnings.
Now, add getAllFieldsRecursively() method.
added @SupressWarning for unused getAllFields() method