Reorganizing and adding test stub.
Changing indenting to JS standard.