Added a get fields method.