Fixed bug with registering WandController. Updates #1097.
Further code cleanup.