updated AccountState to flags, added extensions and tests around them. updated gitignore