updated a lot. Added new constraints. Threading model needs to be totally redone. Things still don't work quite right..