Cleanup output, remove unneeded function