Fixed: range check
Fixed: config generation
Added: JavaDoc comments