quick cleanup, some minor changes in code