implement tzscale as a proper javascript module