General bugfixing and basic Javadocs drafting