Fixing .pyc files and optimizing insert