(cherry picked from commit 079827d)
(cherry picked from commit 5985115)
(cherry picked from commit 2b6d991)
(cherry picked from commit d353158)
Also switch access to many classes to public. (cherry picked from commit 86cc3b7)
(cherry picked from commit e12e095)
(cherry picked from commit 6961ca2)
(cherry picked from commit 0bfb3b6)
(cherry picked from commit a2be7f7)
Also cleans up judgement handling a bit