Started work on safes. Did a little sensical refactoring.
Worked on safes. Fixed invtweaks weirdness by implementing its API.