Unit tests and more reliable dot and key functions