Finished validations, moved a lot of code into new files