Adding static factory methods and declaring unneccessary objects.