Param conversion and some small code fixes.