refactored feature and unit tests

Signed-off-by: Seth Musulin <sethmusulin@gmail.com>