improved main and usability (hopefully)