pretty close now
fixed a lot of basic bugs