minor performance updates

upvalues and stuff :)