Javascript utility framework