Refactored input method and tests. Revmoed unnecessary functions and tests. Converted input to an object.