added documentation & minor fixes

wrote documentation for javadoc and fixed some minor flaws (like thrown
IOException in the constructors)