Everything thoroughly commented.