Improve lesson sorting, add lesson lightning mode, refactor to simplify sorting code