Main: cleaned it up a bit