Added backwards compatibilty

Fixed undefined "data" var
Made constructor argument optional
Added back addData method