Simulation loop + colored edges (both WIP); some minor bugfixes