Added Javadoc comments for usage and made it more general for production
usage!