some further code cleanup