Added custom routes, edited flash code