reformatted a bit
attempt to make inifinite loop checker better...
small changes to layout