General cleanup

Some general compiler message cleanup and switch the line algorithm to a
more efficient one.