Optimizations and new features

More details in the email :)