Added acl magic forwarding function.
Fixed some errors after last commits.