Enhancing Security Of Cryptographic Protocols Through Better Modularization