Underped magicSetup() (similar to #46).

Also removed some trailing whitespace.