Made fields optional

Added error handling, modified legend to handle options