Private messaging

did some minor refactoring