Data can be read from file, some code refactoring done along the way
Adding test inputs