added base testing suite, fixed jsHint warnings and other small improvements.