Some Micro Optimizations/Code cleanup

Signed-off-by: Swizzy <swizzy@hotmail.co.uk>