revised / seperated a bunch of stuff -- see longer comment