Chart working

Some cleanup left to do