refactoring & adding interface to server/account state