Better plot script, other minor modifications