De-dynamic some code
Add more logging