Added context attribute parser and fixed some issues