cleaned up code a bit; seperated building chest from rest