Making macro a little more sane.
Making applications be a plain old userdata; part of #151.