Move accounts stuff into accounts module.

Change-Id: Idf2aaf186daa426fad0ad3f4d90307d8639b0c7e