Reordered package and comments for easier reading.