Added Javadocs for different functions and variables