moved .c files to header
optimized cmake