code cleanup, working placement phase