more plotting options, cleanup and utils