Fixed problems with unit tests and got them green.
Re-organized javascript files back to original order.