fixes all issues where modules could not be found, syntax errors, more optimized
merging with trwey