Update code; simplify usage