some code cleanup and added additional route example