Mostly finished frontend. Needs testing.