Feature improved tests

Cleans up code & tests