Ironed out a few bugs and added support for multiple file read from input