Added some tray functions that need corrections