Added Javadoc and added an init method to initialize the page