Code refactoring, create input algorithm holder class