Modified controller and routes so that they will be able to accept device id in the future.