Updates

refactor tests
improve setup script