Updates, new macros, added Apache license

Lots of updates, new macros and Apache license added