Better Code For Getting Attributes