Added tests and made new feature optional