Code cleanup.
Setup for function magic.