Fixed some things, added some validations