Reordered the account repository and fixed a small bug.