Object-oriented refactorings
Fix bugs in pycon fragments, and add assertion to dexy build to prevent recurrence