Fix variable name
Add function comments
Clean CMakeLists.txt
Clean includes and add comments