Removed the profiling and the useless downcasting