Fixing some careless fromatting, and reducing code.