Added preRoute and postRoute methods