Fix db install script.
Ignore CPD in test file.
Fix javadoc.
Javadoc and refacotring.