Refactored tests, added istanbul