Changed single variable name to avoid missleading.
Added comments and TODOs.