Initial input validation + unit tests for input handling