Thoroughly test code