Added controller to handle direction inputs