started to add functions, need more code cleaning, but it works :-)
also notice a bug with widgets events if I add array/varibale or object source, if I do that widgets events wont fire...