editing works, code cleanup, ui tuning