Cleaned up profiling code
make use of NLL optional again