Minor refactoring.
Cleaner still.
Added stream-based methods.