Some cleanup, adding tests for accounts app