less middleware: minor changes, added tests