Simplify and prettify some auxiliary functions.
Object literals with optional fields.

Doesn't work if the only argument of a function is unit.
self not properly implemented yet.