Fix issue 31 & 32 + Optimizations