Some bugs ironed out and validation changed slightly.