When I am working on a rifle, I keep all the small parts in a cigar box. In the box, I also have a plastic container like you get prescription drugs in. This is for the small lock parts when I have the lock apart. I also have a magneto magnet from a Model T Ford that I use to retrieve the parts that try to escape by leaping off the bench and hiding in the sawdust on the floor.
I really like the plastic magnet idea, though.
Dale H