Improving instance variable vs class variable assignment