Removed old commented code

Dramatically simplified this is_dynamic block
Removed unremoved import from testing