code cleanup
implemented simple profiler output