Refactoring for simplicity

* Removed unnecessary use of an internal slice