-code clean ups
-fixes some issue on setvalues. but still not fully tested