Add constructor and javadocs