code cleanup
this should fix most (I hope all) string signature problems
misc fixes