Rewrote splitlines() method in C for faster array access