make controllers DOM independent