Changed object creation to cleaner format