Tidied up todo js