More validation, minor bug fixes