Added some optimizations
Further updates