some housecleaning, + added model generator