Code is compiling in AS6, seems to be OK. ready to merge.