Autoformat with IDEA for consistency
Add missing calls to applyContextProperties()
Implement clearRect()