Removed unused code, cleaned up field names