Minor changes

Some more minor changes. Cant't run now. Of course you need to refactor
these code later.