Improved sweeping + JavaDoc for head