Minor refactoring;

Javadocs added.