put pretty stuff where it should be, removed redundent code, other beautification