refactored the account module.