Make feature optional, add tests