proper checking for sjcl var (using typeof) in all places, ensure always === & !==, enclose multiple conditionals in if statements, and optimize for loop.