clean up model class to use single function for cleaning input