Updated reference system for frames. More testing required.