tidy up profiler code to be a bit less awful
fix packaging and readme