Create pencil tool for direct pixel manipulation.
Improve some code fragments.