tidying up the source a little
do not override angular.toJson (#4)