Introducing validations; some other misc. changes