Test refactoring and update to JavaDoc