added update command, started update tests, yet again re-factoring some query-builderin