adds todo items, cleans up code slightly