Added rm_field function. Also restructured a bit in the file.