Tidy up source, added commenting. Password is a requirement for initialization