Cleaned up code and added file lines reader