Added todo counter and fixd edit function