Added comments and fixed data leakage. 

Added comments explaining each method. 
Also fixed data leakage that would leak the password over serial at boot.