move fields stuff to its own module