Add some  javadocs and validation