Adding enabled flag, and unit tests