Clear redundant code in models