Added a basic profiler for testing as I go along.