Decouple profiler object from invoking it, add definable container and timeout