Made algorithms classes final so it is ensured they will stay immutable