Add & refactor tests