More tests, started fixing a pretty big bug with isValid