Added lastK flag
Documenter lastk flag
Removed debug output