Add fieldExists() function and improve how fields are loaded.