getListNumLinesMethods and refactoring file