Pre-release refactoring
Update tests