Added slide mode. Very ugly code but at least it works.