Fully updated comments, better names for a couple of functions