Support for callbacks, some syntax cleaning