restructured concentration levels for faster memory access and fixed memory leaks and invalid frees