split tray controller out into own file