Improved argument handler and added option for realtime plotting.