Better error handling
Output buffering and better errors
Every line doesn't have 2 directions, apparently