Code cleanup, wip and few answers.