Fixed issues brought up in IRC

Fixed crash upon alias error when user is not associated with a network
Minor cosmetic changes and refactoring