made the imports explicit, added some comments, fixed the styling