refined my data validation, general changes to try and reduce memory leaks... still a lot of errors to fix.