Change prototypes again.
Free da memory!
Use object literals.
Newline.
Move the conversion code to a static function, and call it from both places.