modularized javascript to customencryption.js. organized structure.

Fixed some spelling too.