Add readline functionality, and move Line validity checking outside of Buffer