Fixed various errors, typos making variables being null, comments not up to date anymore, dead code...