Replace some vars with constants
Fix example in comments
Fix error clearing bug