Fix bugs in pwman.__init__ and add tests
Bug fixes and functionality testing in baseui