Minor code changes
Add integration testing