Code cleanup/simplification