Added @FunctionalInterface annotation where needed