Reworking code

Toolkit code is apparently to be avoided.