hard refactor to use javascript literal instead of json.

enables use of function() in value attribute
allow function as value :)