Added handle_line(), some more functionality, fixes.