ugly secrets.js implementation
moar clean up