Small changes. Working except for scaling and interactive mode.