Add proper headers to files
Add MAX_LINE_COUNT to limit the quadratic time function