Added basic lifetime support

Next step is to fix a bug with the profiler not being shown when the
console is closed