fixed all basic bugs, still some left.