Added the ability to run the shutdown method on midi inputs when they are removed and fixed a reference error where the routes object was not being called correctly.