Updated with java 1.6 compability for the router.