added javadoc, removed debug comments
Code refactored
Code refactored even more