added javadoc
removed some undeeded stuff from test and logic code