code cleanup/search GC

pulled out functions from test that was started which could be used in
multiple places. started coding profile page test of guest card.