added config stuff. changed dictionary comprehension to <2.7 compatability