Fixed global var bug. Improved attribute and builtin support.