Added JavaDoc comments to all files and relevant methods.