autotest function

moved parsing functions to utilities file
created run_autotest function for easy use