Code improvements
Code improvements

Save some CPU and memory

Acidburn0zzz/sdk,Acidburn0zzz/sdk,Acidburn0zzz/sdk,meganz/sdk,meganz/sdk,Acidburn0zzz/sdk,meganz/sdk,meganz/sdk,Acidburn0zzz/sdk,Acidburn0zzz/sdk,meganz/sdk,meganz/sdk,Acidburn0zzz/sdk,meganz/sdk,Acidburn0zzz/sdk