Code clean. Various fixes.