Partial sugarjs externs (need to complete this)