Added more validation, fixed graphs