Refactored current tests and added npm test option.