trimmed code

Removed variables used just once immediately after definition or never -> garbage.
Shortened code parts for faster compilation.