Added secret base flag ctr edit and relevant fixes
Cleanup
Continued Fixes and Improvements