Added configuration and improved performance