Refactor code, add glew to cmake, create main.hpp