pruning and simplifying the code (change things like @[ev] to @ev)