cleaning code in models