Bugfixes, extended example, added fancy useful functions and macros.