Implemented more error handling, adding in more field types