Minor changes, removed dead code.